go/types.Checker.softErrorf (method)
27 uses
go/types (current package)
assignments.go#L593: check.softErrorf(pos, NoNewVar, "no new variables on left side of :=")
builtins.go#L1071: check.softErrorf(x, code, "%s not supported as argument to built-in %s for go1.18 (see go.dev/issue/50937)", x, predeclaredFuncs[id].name)
call.go#L163: check.softErrorf(atPos(pos), InvalidTypeArg, "%s", err)
decl.go#L872: check.softErrorf(fdecl.Name, BadDecl, "generic function is missing function body")
errors.go#L246: func (check *Checker) softErrorf(at positioner, code Code, format string, args ...any) {
labels.go#L44: check.softErrorf(lbl, UnusedLabel, "label %s declared and not used", lbl.name)
labels.go#L153: check.softErrorf(
range.go#L74: check.softErrorf(&x, InvalidRangeExpr, "cannot range over %s: %s", &x, cause)
range.go#L76: check.softErrorf(&x, InvalidRangeExpr, "cannot range over %s", &x)
range.go#L78: check.softErrorf(sKey, InvalidIterVar, "range over %s permits no iteration variables", &x)
range.go#L80: check.softErrorf(sValue, InvalidIterVar, "range over %s permits only one iteration variable", &x)
range.go#L82: check.softErrorf(sExtra, InvalidIterVar, "range clause permits at most two iteration variables")
range.go#L177: check.softErrorf(lhs, InvalidRangeExpr, "cannot use iteration variable of type %s", x.typ)
resolver.go#L416: check.softErrorf(d.decl.Type.TypeParams.List[0], code, "func %s must have no type parameters", name)
resolver.go#L421: check.softErrorf(d.decl.Name, code, "func %s must have no arguments and no return values", name)
resolver.go#L429: check.softErrorf(obj, MissingInitBody, "func init must have a body")
resolver.go#L730: check.softErrorf(obj, UnusedImport, "%q imported and not used", path)
resolver.go#L732: check.softErrorf(obj, UnusedImport, "%q imported as %s and not used", path, obj.name)
signature.go#L390: check.softErrorf(t, InvalidSyntaxTree, "invalid use of ...")
stmt.go#L72: check.softErrorf(v, UnusedVar, "declared and not used: %s", v.name)
stmt.go#L707: check.softErrorf(lhs, NoNewVar, "no new variable on left side of :=")
stmt.go#L782: check.softErrorf(lhs, UnusedVar, "%s declared and not used", lhs.Name)
stmt.go#L848: check.softErrorf(s, InvalidPostDecl, "cannot declare in post statement")
typexpr.go#L179: check.softErrorf(e, MisplacedConstraintIface, "cannot use type %s outside a type constraint: interface is (or embeds) comparable", typ)
typexpr.go#L181: check.softErrorf(e, MisplacedConstraintIface, "cannot use type %s outside a type constraint: interface contains type constraints", typ)
typexpr.go#L493: check.softErrorf(atPos(pos), InvalidTypeArg, "%v", err)
union.go#L131: check.softErrorf(tlist[i], InvalidUnion, "overlapping terms %s and %s", t, terms[j])